
/**HEADER********************************************************************
* 
* Copyright (c) 2011 Freescale Semiconductor;
* All Rights Reserved                       
*
* Copyright (c) 2011 Embedded Access Inc.;
* All Rights Reserved
*
* Copyright (c) 1989-2008 ARC International;
* All Rights Reserved
*
*************************************************************************** 
*
* THIS SOFTWARE IS PROVIDED BY FREESCALE "AS IS" AND ANY EXPRESSED OR 
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  
* IN NO EVENT SHALL FREESCALE OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
* THE POSSIBILITY OF SUCH DAMAGE.
*
**************************************************************************
*
* $FileName: rtc_mpc83xx.h$
* $Version : 3.8.2.1$
* $Date    : Feb-13-2012$
*
* Comments:
*
*   This file contains the type definitions for the mpc83xx RTC module.
*
*END************************************************************************/

#ifndef __rtc_mpc83xx_h__
#define __rtc_mpc83xx_h__

#ifdef __cplusplus
extern "C" {
#endif

/* Flags used to signal user callback requests */
#define RTC_EVENT_SW                       (1<<0)
#define RTC_EVENT_MIN                      (1<<1)
#define RTC_EVENT_ALM                      (1<<2)
#define RTC_EVENT_DAY                      (1<<3)
#define RTC_EVENT_1HZ                      (1<<4)
#define RTC_EVENT_HR                       (1<<5)

#define RTC_STPWCH_CNT(x)                 ((x)&0x1F)

/* standardized names used outside of driver */
/* currently, only alarms and stopwatches are signaled */
#define DEVSPEC_RTC_RTCISR_SW   RTC_EVENT_SW
#define DEVSPEC_RTC_RTCISR_ALM  RTC_EVENT_ALM
#define DEVSPEC_RTC_RTCIENR_SW  RTC_EVENT_SW
#define DEVSPEC_RTC_RTCIENR_ALM RTC_EVENT_ALM

#ifndef __ASM__

typedef struct rtc_time_struct
{
    uint_8      seconds;
    uint_8      minutes;
    uint_8      hours;
    uint_16     days;
} RTC_TIME_STRUCT, _PTR_ RTC_TIME_STRUCT_PTR;

#endif  /* __ASM__ */

#ifdef __cplusplus
}
#endif

#endif
